#include "c.h"
#include "storage/block.h"
#include "storage/relfilenode.h"

#define MAX_CACHE_RELATION 8192

typedef struct CachedRelInfo {
	RelFileNode cached_reln;
	BlockNumber cached_nblocks[MAX_FORKNUM + 1];
} CachedRelInfo;



extern Size FileCacheSize(void);
extern void InitCacheRel(void);

extern CachedRelInfo *FindCacheRel(const RelFileNode *reln);
extern CachedRelInfo *SetupRelCache(const RelFileNode *reln, ForkNumber forkno, BlockNumber nblocks);
extern void RemoveCacheRel(const RelFileNode *reln);